﻿/**
 * @author sminutoli
 * version 1.0
 * Este bridge resuelve el tema del cargador para la página de axioma
 * 
 */
import com.dinmax.flash.draw.control.loader.LoaderListener;
import com.dinmax.flash.draw.control.loader.LoaderBridge;

class com.dinmax.axiomaweb.loader.AxiomaLoaderBridge
extends MovieClip implements LoaderBridge {
	
	//Nombres de los frames que debe tener el MovieClip
	public static var START:String = "start";
	public static var PROGRESS:String = "progress";
	public static var END:String = "end";
	public static var ERROR:String = "error";
	
	// variables del dibujo
	private var txt_percent:TextField;
	//
	
	function onLoad():Void{
		trace("AxiomaLoaderBridge.as | onLoad()");
	};
	
	public function setText(msg:String):Void{
		this.txt_percent.text=msg;
		//this.gotoAndPlay(AxiomaLoaderBridge.START);
	};
	public function setPos(percent:Number):Void{
		this.gotoAndPlay(AxiomaLoaderBridge.PROGRESS);
		
	};
	
	public function error(msg:String):Void{
		trace("AxiomaLoaderBridge.as | error= "+msg);
		this.txt_percent.text=msg;
		this.gotoAndPlay(AxiomaLoaderBridge.ERROR);
	};
	
}